package com.zm.openapi.result;

import com.zm.openapi.model.IResultEnum;
import lombok.Getter;

/**
 * Created by songxl on 2017/7/27.
 * 通用结果枚举
 */
@Getter
public enum SystemResultEnum implements IResultEnum {
    SERVICE_ERROR_NICE_TIP("SYS0000", "系统开小差了，请稍后再试"),
    INVALID_INPUT_PARAM("SYS0001", "输入参数不正确"),
    EXPORT_EXCEL_ERROR("SYS0002", "导出Excel文件出错"),
    REPEAT_OPERATE("SYS0003", "请勿新增重复数据!"),
    UNABLE_MODIFY_PARAM("SYS0004", "参数不可修改"),
    BUSINESS_TIME_OUT("SYS0005", "业务超时，请重试"),
    DATA_HAS_BEAN_CHANGED("SYS0006", "数据已被他人修改，请重新打开"),
    SAVE_FAILED("SYS0007", "保存失败!"),
    GEN_SEQ_CODE_FAILED("SYS0008", "自动生成流水编码失败!"),
    DELETE_DATA_NOT_EXISTS("SYS0009", "删除失败，数据不存在"),
    UPDATE_DATA_NOT_EXISTS("SYS0010", "保存失败，数据不存在"),
    VERSION_NOT_NULL("SYS0011", "数据当前版本号不能为空"),
    DUPLICATED_DATA("SYS0012", "存在重复数据"),
    USED_DATA_CAN_NOT_DELETE("SYS0013", "删除失败，数据已被%s引用"),
    NOT_PERMITTED("SYS0014", "对不起，您没有操作权限"),
    VERSION_NOT_SAME_ERROR("SYS0015", "数据当前版本与请求版本不一致"),
    DATA_EDITING_BY_OTHERS("SYS0016", "数据正在被他人操作，请稍后再试"),
    DELETE_DATA_VALID("SYS0017", "删除失败，数据已生效"),
    DISABLE_DATA_DISABLE("SYS0018", "禁用失败，数据已失效无需禁用"),
    ENABLE_DATA_ENABLE("SYS0019", "启用失败，数据已生效无需启用"),
    DISABLE_DATA_NOT_EXISTS("SYS0020", "禁用失败，数据不存在"),
    ENABLE_DATA_NOT_EXISTS("SYS0021", "启用失败，数据不存在"),
    DISABLE_SUCCESS("SYS0022", "禁用成功"),
    ENABLE_SUCCESS("SYS0023", "启用成功"),
    DELETE_SUCCESS("SYS0024", "删除成功"),
    IMPORT_FILE_EXTENSION_ERROR("SYS0025", "格式异常，请重新下载模板填写数据后上传"),
    FILE_IS_EMPTY("SYS0026", "文件内容为空"),
    FILE_SIZE_EXCEED("SYS0027", "文件大小不能超过%sM"),
    DATA_NOT_EXISTS("SYS0028", "数据不存在"),
    DISABLE_ERROR("SYS0029", "禁用失败"),
    ENABLE_ERROR("SYS0030", "启用失败"),
    DELETE_ERROR("SYS0031", "删除失败"),
    MODIFY_ERROR("SYS0032", "修改失败"),
    LOCK_DATA_FAILED("SYS0033", "尝试锁定数据失败"),
    REFERENCED_DATA_DELETED("SYS0034", "保存失败，引用资料[%s]已被删除或禁用"),
    DATA_NOT_REGISTER_REFERENCE("SYS0035", "当前资料没有注册引用关系"),
    DATE_FORMAT_ERROR("SYS0036", "日期格式有误"),
    UNKNOWN_ERROR("SYS0037", "未知异常"),
    SAVE_SUCCESS("SYS0038", "添加成功"),
    MOBILE_FORM_INVALID("SYS0039", "手机号码格式不正确"),
    ADD_FAILED("SYS0040", "新增失败"),
    TENANT_NOT_EXIST("SYS0041", "租户不存在"),
    DATA_HAS_BEEN_DELETED("SYS0042", "操作失败，数据已删除"),

    RELEASE_FAILED_HAS_BEEN_RELEASED("SYS0100", "发布失败，数据已发布，无需发布"),
    RELEASE_FAILED_NOT_VERIFIED("SYS0101", "发布失败，数据未审核"),
    NO_NEED_VERIFY("SYS0102", "数据已审核,无需审核"),
    NO_NEED_ANTI_VERIFY("SYS0103", "数据未审核,无需反审核"),
    NO_NEED_ENABLE("SYS0104", "已启用,无需启用"),
    NO_NEED_DISABLE("SYS0105", "未启用,无需反启用"),
    SAVE_FAILED_HAS_BEEN_VERIFIED("SYS0106", "保存失败,数据已审核"),
    USER_NOT_NOT_EXISTS("SYS0107", "用户不存在"),
    SAVE_FAILED_HAS_BEEN_RELEASED("SYS0108", "保存失败,数据已发布"),
    FREEZE_ERROR("SYS0109", "冻结失败"),
    THAW_ERROR("SYS0110", "释放失败"),
    EMPLOYEE_RESIGNATION_ERROR("SYS0111", "离职修改失败"),
    EMPLOYEE_RESIGNED("SYS0112", "员工已离职"),
    DELETE_REFERENCED_ERROR("SYS0113", "删除失败,数据已被引用"),
    DELETE_PRESET_ERROR("SYS0114", "预置数据不能删除"),
    UPDATE_PRESET_ERROR("SYS0115", "预置数据不能修改"),
    REQUEST_INVALID("SYS0116", "请求无效"),
    API_CALL_ERROR("SYS0117", "接口远程调用异常"),

    //基础资料数据
    MATERIAL_DATA_SERVICE_NOT_EXISTS("SYS0120", "未找到对应的资料数据获取服务"),
    MAX_UPLOAD_SIZE_EXCEEDED("SYS0140", "超出文件上传最大限制"),

    ;

    private String code;

    private String msg;

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    private SystemResultEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
